home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2795 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  3.2 KB

  1. Path: news.cis.nctu.edu.tw!usenet
  2. From: terryt@mcs.com (Terry Trippany)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Why are 32 bit better than 16 bit pgms?
  5. Date: 19 Jan 1996 19:21:49 GMT
  6. Organization: STR/Baxter Labs
  7. Message-ID: <4dor0d$fj3@news.cis.nctu.edu.tw>
  8. References: <4djtqn$j96@news1.usa.pipeline.com>
  9. NNTP-Posting-Host: @159.198.73.111
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-Newsreader: WinVN 0.99.7
  13.  
  14. In article <4djtqn$j96@news1.usa.pipeline.com>, 
  15. grantp@usa.pipeline.com says...
  16. >
  17. >On Jan 16, 1996 11:43:34 in article <Why are 32 bit better than 
  18. 16 bit
  19. >pgms?>, '"Keith S." <vain@netcom.com>' wrote: 
  20. >>I have a simple questions: 
  21. >> 
  22. >>What's are 32 bit pgms better than 16 bit programs? 
  23. >> 
  24. >Better programmers generally produce better programs -- 
  25. >bitness doesn't come into play :-) 
  26. >Now, if you mean why we should develop 32-bit programs 
  27. >rather than 16, there's many reasons.  Here's a couple: 
  28. >1.  32-bit programs run faster. 
  29.  
  30. >2.  32-bit programs are easier to write -- thereby increasing 
  31. >programmer productivity. 
  32.  
  33. While this may true when considering that you don't need LPSTRS 
  34. and all window handles are now 32 bit, there are many 
  35. considerations here. 
  36.  
  37. For instance, Windows NT is a preemptive, thread based OS.  These 
  38. issues are much more complex.  The tools and libraries we use to 
  39. write applications are now better. 
  40.  
  41. In NT we can have many instances of the same program.  Thus shared 
  42. memory becomes an issue.  Disk access and file mapping is also to 
  43. be considered.
  44.  
  45. While these features are an inherent advantage in the 32 bit 
  46. world, this doesn't necessarily make it easier.
  47.  
  48. Many of the advantages of 32 bit windows applications are as 
  49. follows:
  50.  
  51. 1. 32 bit memory management.  This removes any dependence on the 
  52. x86 cpu, no segment/offset addressing methods.
  53.  
  54. 2. Structured exception handling.  
  55.  
  56. 3. You break the 64k barrier.
  57.  
  58. 4. File mapping - you can allocate a block of memory and associate 
  59. it with a disk file.  Thus the OS takes care of all the buffering, 
  60. file opening, etc.
  61.  
  62. 5. 16 bit windows limited your networking to non-blocking calls 
  63. which necessitates polling or some kind of messaging scheme.  With 
  64. blocking calls, the OS can inform the application when the request 
  65. is completed.
  66.  
  67. 6. Subclassing has changed in Win32 in a way that pushes the 
  68. developer into using OLE because you can no longer subclass a 
  69. window or class that belongs to another process.  This is more 
  70. complex yet safer.
  71.  
  72.  
  73. The list goes on and on.  In any case it would be advantageous in 
  74. most cases to start porting your 16 bit applications to 32 bit, 
  75. get comfortable with the new 32 bit api's, and learn the new 
  76. complexities of the Win32 OS's if windows is your target.
  77.  
  78. Hope this helps,
  79. Later
  80.  
  81. /----------------------------------------------------------------\
  82. | Terry Trippany                                                 |
  83. | terryt@mcs.com                                                 |
  84. | Strategic Technology Resources                                 |
  85. | Chicago, IL                                                    |
  86. |                                                                |
  87. | "A question asked is often a lesson learned"                   |
  88. \----------------------------------------------------------------/
  89.  
  90.  
  91.